import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  productName: [
    { required: true, message: "商品名称为必填项", trigger: "blur" }
  ],
  productCode: [
    { required: true, message: "商品条码为必填项", trigger: "blur" }
  ],
  productPrice: [
    { required: true, message: "商品市场价为必填项", trigger: "blur" }
  ],
  productSalePrice: [
    { required: true, message: "商品售价为必填项", trigger: "blur" }
  ],
  productNum: [{ required: true, message: "商品库存为必填项", trigger: "blur" }]
});
